<template>
    <el-dialog v-bind="$attrs"
               destroy-on-close
               :close-on-click-modal="false"
               :width="width_c"
    >

        <slot></slot>

        <template #footer v-if="$slots['footer']">
            <slot name="footer"></slot>
        </template>

    </el-dialog>
</template>

<script setup lang="ts">
import {computed, onMounted} from "vue";

    const props = withDefaults(defineProps<{
        width?: string | number
    }>(), {
        width: 1200
    })

    const width_c = computed(() => {

        let width = props.width

        if (window.innerWidth<900 && props.width>900){
            width = '90%'
        }

    })

</script>

<style>

</style>